#ifndef _CMESSAGEBOX_H_
#define _CMESSAGEBOX_H_

#include <buola/widgets/cwidget.h>

namespace buola { namespace gui {

class CMessageBox : public CWidget
{
public:
    CMessageBox(const PWindow &pOwner,const std::wstring &pTitle,const std::wstring &pText,TStyle=MBS_OK|MBS_CANCEL|MBS_INFO);
    ~CMessageBox();
    
    int GetResult()             {   return mResult;     }

protected:
    void Shape();

public:
////////////// Event handling //////////////
    virtual void OnExpose(const CExposeEvent &pE);
    void OnButton(TID pID);

    static int NewBox(CWindow*,const std::wstring&,const std::wstring&,
                      TStyle=MBS_OK|MBS_CANCEL|MBS_INFO);

protected:
    PWindow mOwner;
    img::PFont mFont;

    std::vector<PButton> mButtons;

    std::wstring mText;

    int mResult;

////////////////// static data //////////////////
};

/*namespace gui*/ } /*namespace buola*/ }

#endif
